<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>会员中心</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <meta name="format-detection" content="telephone=no">
        <meta name="renderer" content="webkit">
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link rel="stylesheet" href="__CSS__/amazeui.min.css"/>
        <script src="__JS__/jquery.min.js"></script>
        <script src="__JS__/amazeui.min.js"></script>
    </head>
    <body>
        <style type="text/css">
            .container {
                background-color:#F2F2F2;
                margin-bottom: 50px;
            }
            div {
                background-color:white;
            }
            .font-color-one {
                color:#FE645E;
                font-weight: bold;
            }
            .gray {
                color:#9E9E9E;
            }
            .font-size-one {
                font-size:1.4rem;
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
            }
            .top-box {
                padding-top:20px;
                padding-bottom: 20px;
                border-bottom: 1px solid white;
            }
            .top-m-left {
                margin-left:15px;
            }
            .address-box {
                padding:5px 1rem;
                margin-top:15px;
                width:100%;
            }
            .address-box td {
                padding-right:0px !important;
            }
            .good-box {
                margin-top:15px;
                padding:5px;
            }
            .good-box ul ,.cost-box ul{
                list-style: none;
                padding-left: 0 !important;
            }
            .good-box ul li {
                padding:5px;
                border-bottom: 1px solid #F2F2F2;
            }
            .price-box {
                color:#FE645E;
                font-size:1.8rem;
            }
            .last-price-box {
                padding-right:25px;
                color:#FE645E;
                font-size:1.8rem;
                text-align:right;
            }
            .leave-message-box {
                margin-top:15px;
                padding:10px 5px;
            }
            .leave-message-box .am-u-sm-4 {
                padding-right: 0px !important;
            }
            .leave-message-box .am-u-sm-8 {
                padding-left: 0px !important;
            }
            .message-content {
                font-size:1.3rem;
            }
            .cost-box {
                margin-top:15px;
            }
            .cost-box ul li {
                padding:2px;
            }

            .navCir {
                position: fixed;
                bottom: 0px;
                width: 100%;
                z-index: 999;
                background: #fff;
            }
            .navCir li {
                width: 25%;
                padding: 5px;
                background: #fff;
                border-top: 1px solid #f5f5f5;
                float: left;
                text-align: center;
                font-size: 14px;
            }
            .navCir li.active a {
                color: #F03726;
            }
            a:link, a:visited, a:hover {
                text-decoration: none;
                outline: none;
            }
            li {
                list-style: none;
            }
            .navCir li i {
                font-size: 18px;
            }
        </style>
        <div  class="container">
            <!--隐藏订单号-->
            <input type="hidden" id="order_code" value="{$order_code}"/>
            <div class="top-box am-g">
                <div class="top-left am-u-sm-3">
                    <span class="font-color-one">待付款</span>
                </div>
                <div class="top-right am-u-sm-9">
                    <button class="am-btn am-btn-default am-radius top-m-left"  onclick="cancel()">取消订单</button><button class="am-btn am-btn-danger am-radius top-m-left">去付款</button>
                </div>
            </div>
            <div class="address-box">
                <table>
                    <tr class="am-g">
                        <td class="am-u-sm-4">订单号:</td><td class="am-u-sm-8">{$order_code}</td>
                    </tr>
                    <tr class="am-g">
                        <td class="am-u-sm-4">下单时间:</td><td class="am-u-sm-8">{$createtime|date='Y.m.d',###}</td>
                    </tr>
                    <tr class="am-g">
                        <td class="am-u-sm-4">收货信息:</td><td class="am-u-sm-8">{$contactname}  {$mobile}<br/>{$detailinfo}</td>
                    </tr>
                </table>
            </div>
            <div class="good-box ">
                <ul>
                    <volist name="items" id="vo">
                        <li class="am-g">
                            <div class="am-u-sm-4"><img src="{$vo['img_url']}" class="am-img-thumbnail"></div>
                            <div class="am-u-sm-8">
                                <div>{$vo['name']}</div>
                                <div class="gray font-size-one">{$vo['sku_desc']}</div>
                                <div class="price-box">￥{$vo['price']}</div>
                            </div>
                        </li>
                    </volist>
                </ul>
            </div>
            <div class="leave-message-box">
                <div class="am-g">
                    <div class="am-u-sm-4">您的留言:</div>
                    <div class="am-u-sm-8 message-content">黑色的不要只要漂亮有气质的火箭升空的数据库金山毒霸和金山毒霸那几年十分大师傅大师傅十分的撒犯得上发vs的方式</div>
                </div>
            </div>
            <div class="cost-box am-cf">
                <ul>
                    <li class="am-g">
                        <div class="am-u-sm-6">商品金额</div>
                        <div class="am-u-sm-6 last-price-box">￥{$goods_amount}</div>
                    </li>
                    <li class="am-g">
                        <div class="am-u-sm-6">运费</div>
                        <div class="am-u-sm-6 last-price-box">￥{$post_price}</div>
                    </li>
                    <li class="am-g">
                        <div class="am-u-sm-6">应付金额</div>
                        <div class="am-u-sm-6 last-price-box">￥{$price}</div>
                    </li>
                    <li class="am-g">
                        <div class="am-u-sm-6">支付方式</div>
                        <div class="am-u-sm-6" style="text-align: right;padding-right:25px;">微信支付</div>
                    </li>
                </ul>
            </div>
            <!--底部-->
            <script type="text/javascript">
                function goback(){
                    window.history.go(-1);
                }

                /*
                * 取消订单事件
                * */
                function cancel(){
                    var order_code = $('#order_code').val();
                    console.log('dasdas');
                    $.post("{:U('Order/cancel')}",{order_code:order_code},function(res){
                        if(res['status']){
                            $('#my-alert .am-modal-bd').text('订单取消成功');
                            $('#my-alert').modal();
                        }else{
                            $('#my-alert .am-modal-bd').text('订单取消失败');
                            $('#my-alert').modal();
                        }
                    })
                }
            </script>

            <!--模态弹窗-->
            <div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
                <div class="am-modal-dialog">
                    <div class="am-modal-hd">系统提醒</div>
                    <div class="am-modal-bd">
                        Hello world！
                    </div>
                    <div class="am-modal-footer">
                        <span class="am-modal-btn">确定</span>
                    </div>
                </div>
            </div>

            <div class="navCir">
                <li class="active"><a href="{:U('Index/index')}"><i class="am-icon-home "></i>首页</a></li>
                <li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
                <li><a href="{:U('ShoppingCart/index')}"><i class="am-icon-shopping-cart"></i>购物车</a></li>
                <li><a href="{:U('UserCenter/index')}"><i class="am-icon-user"></i>我的</a></li>
            </div>
        </div>

    </body>

</html>